{% extends 'layout/basic.html' %}
{% load static %}
{% block title %} 订单 {% endblock %}

{% block content %}

    <div class="container">

     {% if user_trade == "True"  %}

         <h2>您还没有订单！</h2>
    <a class="btn btn-primary" href="{% url "web:price" %}">前往购买</a>
        {% else %}


        <h2>您的订单信息如下:</h2>
        <table class="table">
            <thead>
            <tr>
                <th>订单号</th>
                <th>单价</th>
                <th>数量</th>
                <th>到期时间</th>
                <th>订单状态</th>
                <th>金额</th>
            </tr>
            </thead>
            <tbody>
            {% for inte in user_trade %}
            <tr>
                 <td>{{ inte.tradeid }}</td>

                {% if inte.type == 1%}
                <td>套餐1:￥10/月</td>
                {% endif %}
                {% if inte.type == 2%}
                <td>套餐2:￥38/季</td>
                     {% endif %}
                {% if inte.type == 3%}
                <td>套餐3:￥110/年</td>
                     {% endif %}


                <td>{{ inte.number }}</td>

                <td>{{ inte.end }}</td>



               {% if inte.status == 1%}
                <td>支付失败</td>
                {% endif %}
                {% if inte.status == 2%}
                <td>支付成功</td>
                     {% endif %}

                <td>￥{{ inte.money }}</td>

            </tr>
            {% endfor %}
            </tbody>
        </table>
        <a class="btn btn-primary" href="/web/index/">返回主页</a>
        {% endif %}


    </div>

{% endblock %}